package com.hejjon.syyapi.dao;

import com.hejjon.syyapi.entity.XUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by caoshi at 21:22 2021-10-07
 */
public interface IXUserDao extends JpaRepository<XUser, String>, JpaSpecificationExecutor<XUser> {

    @Query("from XUser where username = :username and password = :password")
    XUser findByUnameAndPwd(@Param("username") String uname, @Param("password") String pwd);
}
